<include file="Public:header" />
<!--Morris Chart CSS -->
<link rel="stylesheet" href="__JS__/morris-chart/morris.css">
<!-- main content start-->
<div class="main-content" >

    <!-- header section start-->
    <div class="header-section">
        <!--toggle button start-->
        <a class="toggle-btn"><i class="fa fa-bars"></i></a>
        <!--toggle button end-->


        <!--notification menu start -->
        <div class="menu-right">
            <ul class="notification-menu">
                <li>
                    <a href="#" class="btn btn-default dropdown-toggle info-number" data-toggle="dropdown">
                        <i class="fa fa-bell-o"></i>
                        <span class="badge">2</span>
                    </a>
                    <div class="dropdown-menu dropdown-menu-head pull-right">
                        <h5 class="title">系统消息</h5>
                        <ul class="dropdown-list normal-list">
                            <li class="new">
                                <a href="">
                                    <span class="label label-danger"><i class="fa fa-bolt"></i></span>
                                    <span class="name">Server #5 overloaded.  </span>
                                    <em class="small">4 hrs</em>
                                </a>
                            </li>
                            <li class="new">
                                <a href="">
                                    <span class="label label-danger"><i class="fa fa-bolt"></i></span>
                                    <span class="name">Server #31 overloaded.  </span>
                                    <em class="small">4 hrs</em>
                                </a>
                            </li>
                            <li class="new"><a href="">查看所有系统消息</a></li>
                        </ul>
                    </div>
                </li>
                <li>
                    <a href="#" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
                        <img src="__IMG__/photos/user-avatar.png" alt="" />
                        {$shopname}
                        <span class="caret"></span>
                    </a>
                    <ul class="dropdown-menu dropdown-menu-usermenu pull-right">
                        <li><a href="{:U('Shopadmin/Login/info')}"><i class="fa fa-user"></i>  个人信息</a></li>
                        <li><a href="{:U('Shopadmin/Login/changePwd')}"><i class="fa fa-cog"></i>  修改密码</a></li>
                        <li><a href="{:U('Shopadmin/Login/logout')}"><i class="fa fa-cog"></i>  退出登录</a></li>
                    </ul>
                </li>

            </ul>
        </div>
        <!--notification menu end -->
    </div>
<!-- header section end-->

<!--body wrapper start-->
<div class="wrapper">
    <div class="row states-info">
        <div class="col-md-3">
            <div class="panel red-bg">
                <div class="panel-body">
                    <a href="{:U('Shopadmin/WorkOrder/index')}" style="text-decoration:none;out-line: none;color:white;">
                    <div class="row">
                        <div class="col-xs-4">
                            <i class="fa fa-file-text"></i>
                        </div>
                        <div class="col-xs-8">
                            <span class="state-title"> 工单管理 </span>
                            <h4>{$gd_count}</h4>
                        </div>
                    </div>
                    </a>
                </div>
            </div>
        </div>
        <div class="col-md-3">
            <div class="panel blue-bg">
                <div class="panel-body">
                    <a href="{:U('Shopadmin/Customer/customer')}" style="text-decoration:none;out-line: none;color:white;">
                    <div class="row">
                        <div class="col-xs-4">
                            <i class="fa fa-user"></i>
                        </div>
                        <div class="col-xs-8">
                            <span class="state-title">  客户管理  </span>
                            <h4>{$customer_count}</h4>
                        </div>
                    </div>
                    </a>
                </div>
            </div>
        </div>
        <div class="col-md-3">
            <div class="panel green-bg">
                <div class="panel-body">
                    <a href="{:U('Shopadmin/Ms/ms')}" style="text-decoration:none;out-line: none;color:white;">
                    <div class="row">
                        <div class="col-xs-4">
                            <i class="fa fa-envelope"></i>
                        </div>
                        <div class="col-xs-8">
                            <span class="state-title">  短信记录  </span>
                            <h4>{$ms_count}</h4>
                        </div>
                    </div>
                    </a>
                </div>
            </div>
        </div>

        <div class="col-md-3">
            <div class="panel yellow-bg">
                <div class="panel-body">
                    <a href="{:U('Shopadmin/Goods/index')}" style="text-decoration:none;out-line: none;color:white;">
                    <div class="row">
                        <div class="col-xs-4">
                            <i class="fa fa-gift"></i>
                        </div>

                        <div class="col-xs-8">
                            <span class="state-title">  产品列表  </span>
                            <h4>{$goods_count}</h4>
                        </div>
                    </div>
                    </a>
                </div>
            </div>
        </div>

    </div>
    <div class="row">
        <div class="col-md-6">
            <div class="panel">
                <header class="panel-heading">
                    最新产品
                </header>
                <div class="panel-body">
                    <section id="unseen">
                        <table class="table table-bordered table-striped table-condensed">
                            <thead>
                            <tr>
                                <th>产品名称</th>
                                <th>库存</th>
                                <th>产品图片</th>
                                <th>添加时间</th>
                            </tr>
                            </thead>
                            <tbody>
                            <volist name="goods" id="vo">
                                <tr>
                                    <td>{$vo.goods_name}</td>
                                    <td>{$vo.amount}</td>
                                    <td><volist name="vo.goods_thumb" id="th"><img src="/{$th}" width="35" height="35" onerror="this.src='__IMG__/cat.png'" style="border-radius:35px;"></volist></td>
                                    <td>
                                        <empty name="vo.add_time">
                                            -
                                            <else/>
                                            {$vo.add_time|date="Y-m-d H:i:s",###}
                                        </empty>
                                    </td>
                                </tr>
                            </volist>
                            </tbody>
                        </table>
                    </section>
                </div>
            </div>
        </div>
        <div class="col-md-6">
            <div class="panel">
                <header class="panel-heading">
                    最新客户
                </header>
                <div class="panel-body">
                    <ul class="chats cool-chat">
                        <volist name="customer" id="v">
                            <li class="out">
                                <div class="message" style="text-align:left;padding:10px 30px;">
                                    <a class="name" href="#">{$v.name}</a>
                                    <span class="datetime" style="color:orange;">
                                        {$v.node}
                                    </span>
                                    <span class="body">
                                                {$v.address}
                                        <span style="margin-left:5px;">{$v.phone}</span>
                                        <span style="margin-left: 25px;">
                                        <empty name="vo.add_time">
                                        -
                                        <else/>
                                        {$vo.add_time|date="Y-m-d H:i:s",###}
                                         </empty>
                                        </span>
                                    </span>
                                </div>
                            </li>
                        </volist>
                    </ul>
                </div>
            </div>
        </div>
    </div>

    <div class="row">
        <div class="col-sm-12">
            <section class="panel">
                <header class="panel-heading">
                    来电统计
                    <span class="tools pull-right">
                        <ul class="revenue-nav" style="margin-top: 0px;">
                        <li <eq name="search" value="day">class="active"</eq>><a href="{:U('Shopadmin/index/index',array('keyword'=>'day'))}">当天数据</a></li>
                            <li <eq name="search" value="week">class="active"</eq>><a href="{:U('Shopadmin/index/index',array('keyword'=>'week'))}">周数据</a></li>
                            <li <eq name="search" value="month">class="active"</eq>><a href="{:U('Shopadmin/index/index',array('keyword'=>'month'))}">月数据</a></li>
                            <li <eq name="search" value="year">class="active"</eq>><a href="{:U('Shopadmin/index/index',array('keyword'=>'year'))}">年数据</a></li>
                    </ul>
                    </span>
                </header>
                <div class="panel-body">
                    <div id="graph-line"></div>
                </div>
            </section>
        </div>
    </div>


</div>
<!--body wrapper end-->
<!-- main content end-->
    <script type="text/javascript">
        window.data={$data};
    </script>
    <!--Morris Chart-->
    <script src="__JS__/morris-chart/morris.js"></script>
    <script src="__JS__/morris-chart/raphael-min.js"></script>
    <script src="__JS__/morris-chart/morris.init.js"></script>
<include file="Public:footer" />